php regex - replace on "\${1}"

Posted by Qiao on Stack Overflow See other posts from Stack Overflow or by Qiao
Published on 2010-03-23T11:24:22Z Indexed on 2010/03/23 11:33 UTC
Read the original article Hit count: 221

Filed under:
|

found this regex:

insert " " every 10 characters:  
$text =  preg_replace("|(.{10})|u", "\${1}"." ", $text);

can you, please, explain what \${1} means. Why using \ and what curly brackets means?

© Stack Overflow or respective owner

Related posts about php

Related posts about regex